﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TestMatrix.Model
{
    public class tblNumOfCreatedTC : INotifyPropertyChanged, INotifyPropertyChanging
    {
        public tblNumOfCreatedTC()
        {
           
        }

        public tblNumOfCreatedTC(
            int id
            , string application
            , string createdDate
            , int numCreatedTC
            )
        {
            this.ID = id;
            this.Application = application;
            this.CreatedDate = createdDate;
            this.NumCreatedTC = numCreatedTC;
        }

        private int _ID;

        public int ID
        {
            get { return _ID; }
            set
            {
                if (_ID != value)
                {
                    NotifyPropertyChanging("ID");
                    _ID = value;
                    NotifyPropertyChanged("ID");
                }
            }

        }
        
        private string _Application;

        public string Application
        {
            get { return _Application; }
            set
            {
                if (_Application != value)
                {
                    NotifyPropertyChanging("Application");
                    _Application = value;
                    NotifyPropertyChanged("Application");
                }
            }
        }

        private string _CreatedDate;

        public string CreatedDate
        {
            get { return _CreatedDate; }
            set
            {
                if (_CreatedDate != value)
                {
                    NotifyPropertyChanging("CreatedDate");
                    _CreatedDate = value;
                    NotifyPropertyChanged("CreatedDate");
                }
            }
        }

        private int _NumCreatedTC;

        public int NumCreatedTC
        {
            get { return _NumCreatedTC; }
            set
            {
                if (_NumCreatedTC != value)
                {
                    NotifyPropertyChanging("NumCreatedTC");
                    _NumCreatedTC = value;
                    NotifyPropertyChanged("NumCreatedTC");
                }
            }

        }

        //private int _Count;

        //public int Count
        //{
        //    get { return _Count; }
        //    set
        //    {
        //        if (_Count != value)
        //        {
        //            NotifyPropertyChanging("Count");
        //            _Count = value;
        //            NotifyPropertyChanged("Count");
        //        }
        //    }

        //}

        public event PropertyChangedEventHandler PropertyChanged;

        // Used to notify that a property changed
        private void NotifyPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        public event PropertyChangingEventHandler PropertyChanging;

        // Used to notify that a property is about to change
        private void NotifyPropertyChanging(string propertyName)
        {
            if (PropertyChanging != null)
            {
                PropertyChanging(this, new PropertyChangingEventArgs(propertyName));
            }

        }
    }
}
